<center>
<?php
	require_once('oc.php');


    $oc = new oc();
	//Form query
$query = "SELECT USERNAME, ADDRESSCITY FROM USERS";
//Prepare and execute query

$results = $oc->fetch($query);
//Display results
echo "<table border=1>\n";
foreach($results as $result)
{
$name = $result['USERNAME'];
$pop = $result['ADDRESSCITY'];
echo "<tr>\n";
echo "<td>$name</td>\n";
echo "<td>$pop</td>\n";
echo "</tr>\n";
}
echo "</table>\b";

$query = "SELECT USERNAME FROM USERS";
$results = $oc->fetch($query);
echo "<table border=1>\n";
for($i = 0; $i<2; $i++)
{
$name = $results['USERNAME'][$i];
$pop = $results['ADDRESSCITY'][$i];
echo "<tr>\n";
echo "<td>$name</td>\n";
echo "<td>$pop</td>\n";
echo "</tr>\n";
}
echo "</table>\b";

unset($oc);
?>
</center>
